
// VisionGraphView.h : interface of the CVisionGraphView class
//

#pragma once

#include "VisionGraphControl.h"
#include "VisionWrapper.h"

class CVisionGraphView : public CView
{
protected: // create from serialization only
	CVisionGraphView();
	DECLARE_DYNCREATE(CVisionGraphView)

// Attributes
public:
	CVisionGraphDoc* GetDocument() const;

// Operations
public:
	
	CVisionGraphControl m_wndControl;
// Overrides
public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
	virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
	virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);

// Implementation
public:
	virtual ~CVisionGraphView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	DECLARE_MESSAGE_MAP()
public:
	void CreateDatabaseRelationships(void);
//	virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnGraphRClick(NMHDR* pNMHDR, LRESULT* pResult);
	// GetVisionCaption
	CString GetVisionCaption(void);
	// AddVisionGraph
	bool AddVisionGraph(CVisionWrapper* vision);
};

#ifndef _DEBUG  // debug version in VisionGraphView.cpp
inline CVisionGraphDoc* CVisionGraphView::GetDocument() const
   { return reinterpret_cast<CVisionGraphDoc*>(m_pDocument); }
#endif

